import { Component, OnInit } from '@angular/core';
@Component({
  selector: 'app-parent-comp',
  templateUrl: './parent-comp.component.html',
  styleUrls: ['./parent-comp.component.scss']
})
export class ParentCompComponent implements OnInit {
  curret:string='这是我第一次用Input传递信息';
  name:string='andy';
  age:number=19;
  items = ['item1', 'item2', 'item3', 'item4'];
  size:number=16;
  inputVal:string='';
  formName:string='andy';
  formAge:number=18;
  expandVal:string='';
  constructor() { }

  ngOnInit(): void {
  }
  addItem(newItem:string){
    this.items.push(newItem)
  }
  inc(){
    this.size=Math.min(this.size+4,40);
  }
  dec(){
    this.size=Math.max(this.size-4,10);
  }
}
